package com.momoc.logic;
import com.momoc.logic.service.TestServiceRpc;
import com.momoc.mrpc.annotation.EnabledMRpc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

//扫描rpc下面的业务
@EnabledMRpc(baseScans = {"com.momoc.logic"})
@SpringBootApplication
public class AppClientRun {

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext run = SpringApplication.run(AppClientRun.class);

        Thread.sleep(2000);
        TestServiceRpc bean = run.getBean(TestServiceRpc.class);
        System.out.println(System.currentTimeMillis());
        bean.test();
        System.out.println(System.currentTimeMillis());

//        System.out.println(bean);
//        System.out.println(bean.getTestService());

    }
}
